package com.azure.jedis;

import redis.clients.jedis.util.JedisClusterCRC16;

/**
 * redis 分片算法
 */
public class CRC16 {
    public static void main(String[] args) {
        String str1 = "name1";
        System.out.println(JedisClusterCRC16.getCRC16(str1) % 16384);
//        System.out.println(JedisClusterCRC16.getCRC16(str1) << (2^14-1));
        System.out.println(JedisClusterCRC16.getCRC16(str1) % (16384-1));
        System.out.println(2<<13);
    }
}
